      module mo_lu_factor
      private
      public :: lu_fac
      contains
      subroutine lu_fac01( lu )
      use shr_kind_mod, only : r8 => shr_kind_r8
      implicit none
!-----------------------------------------------------------------------
! ... dummy args
!-----------------------------------------------------------------------
      real(r8), intent(inout) :: lu(:)
         lu(1) = 1._r8 / lu(1)
         lu(2) = 1._r8 / lu(2)
         lu(3) = 1._r8 / lu(3)
         lu(4) = lu(4) * lu(3)
         lu(5) = lu(5) * lu(3)
         lu(66) = lu(66) - lu(4) * lu(64)
         lu(74) = lu(74) - lu(5) * lu(64)
         lu(7) = 1._r8 / lu(7)
         lu(8) = lu(8) * lu(7)
         lu(9) = lu(9) * lu(7)
         lu(10) = lu(10) * lu(7)
         lu(13) = lu(13) - lu(8) * lu(12)
         lu(15) = - lu(9) * lu(12)
         lu(16) = lu(16) - lu(10) * lu(12)
         lu(47) = - lu(8) * lu(46)
         lu(51) = lu(51) - lu(9) * lu(46)
         lu(53) = lu(53) - lu(10) * lu(46)
         lu(66) = lu(66) - lu(8) * lu(65)
         lu(72) = lu(72) - lu(9) * lu(65)
         lu(74) = lu(74) - lu(10) * lu(65)
         lu(13) = 1._r8 / lu(13)
         lu(14) = lu(14) * lu(13)
         lu(15) = lu(15) * lu(13)
         lu(16) = lu(16) * lu(13)
         lu(41) = lu(41) - lu(14) * lu(37)
         lu(42) = lu(42) - lu(15) * lu(37)
         lu(44) = lu(44) - lu(16) * lu(37)
         lu(50) = lu(50) - lu(14) * lu(47)
         lu(51) = lu(51) - lu(15) * lu(47)
         lu(53) = lu(53) - lu(16) * lu(47)
         lu(71) = lu(71) - lu(14) * lu(66)
         lu(72) = lu(72) - lu(15) * lu(66)
         lu(74) = lu(74) - lu(16) * lu(66)
         lu(17) = 1._r8 / lu(17)
         lu(18) = lu(18) * lu(17)
         lu(19) = lu(19) * lu(17)
         lu(20) = lu(20) * lu(17)
         lu(21) = lu(21) * lu(17)
         lu(22) = lu(22) * lu(17)
         lu(39) = lu(39) - lu(18) * lu(38)
         lu(41) = lu(41) - lu(19) * lu(38)
         lu(42) = lu(42) - lu(20) * lu(38)
         lu(44) = lu(44) - lu(21) * lu(38)
         lu(45) = lu(45) - lu(22) * lu(38)
         lu(68) = lu(68) - lu(18) * lu(67)
         lu(71) = lu(71) - lu(19) * lu(67)
         lu(72) = lu(72) - lu(20) * lu(67)
         lu(74) = lu(74) - lu(21) * lu(67)
         lu(75) = lu(75) - lu(22) * lu(67)
         lu(23) = 1._r8 / lu(23)
         lu(24) = lu(24) * lu(23)
         lu(25) = lu(25) * lu(23)
         lu(28) = lu(28) - lu(24) * lu(26)
         lu(29) = lu(29) - lu(25) * lu(26)
         lu(42) = lu(42) - lu(24) * lu(39)
         lu(44) = lu(44) - lu(25) * lu(39)
         lu(58) = lu(58) - lu(24) * lu(55)
         lu(60) = lu(60) - lu(25) * lu(55)
         lu(72) = lu(72) - lu(24) * lu(68)
         lu(74) = lu(74) - lu(25) * lu(68)
         lu(80) = lu(80) - lu(24) * lu(76)
         lu(82) = - lu(25) * lu(76)
         lu(27) = 1._r8 / lu(27)
         lu(28) = lu(28) * lu(27)
         lu(29) = lu(29) * lu(27)
         lu(30) = lu(30) * lu(27)
         lu(51) = lu(51) - lu(28) * lu(48)
         lu(53) = lu(53) - lu(29) * lu(48)
         lu(54) = lu(54) - lu(30) * lu(48)
         lu(72) = lu(72) - lu(28) * lu(69)
         lu(74) = lu(74) - lu(29) * lu(69)
         lu(75) = lu(75) - lu(30) * lu(69)
         lu(80) = lu(80) - lu(28) * lu(77)
         lu(82) = lu(82) - lu(29) * lu(77)
         lu(83) = lu(83) - lu(30) * lu(77)
         lu(32) = 1._r8 / lu(32)
         lu(33) = lu(33) * lu(32)
         lu(34) = lu(34) * lu(32)
         lu(35) = lu(35) * lu(32)
         lu(41) = lu(41) - lu(33) * lu(40)
         lu(43) = lu(43) - lu(34) * lu(40)
         lu(44) = lu(44) - lu(35) * lu(40)
         lu(50) = lu(50) - lu(33) * lu(49)
         lu(52) = lu(52) - lu(34) * lu(49)
         lu(53) = lu(53) - lu(35) * lu(49)
         lu(57) = lu(57) - lu(33) * lu(56)
         lu(59) = lu(59) - lu(34) * lu(56)
         lu(60) = lu(60) - lu(35) * lu(56)
         lu(71) = lu(71) - lu(33) * lu(70)
         lu(73) = - lu(34) * lu(70)
         lu(74) = lu(74) - lu(35) * lu(70)
         lu(79) = - lu(33) * lu(78)
         lu(81) = lu(81) - lu(34) * lu(78)
         lu(82) = lu(82) - lu(35) * lu(78)
         lu(41) = 1._r8 / lu(41)
         lu(42) = lu(42) * lu(41)
         lu(43) = lu(43) * lu(41)
         lu(44) = lu(44) * lu(41)
         lu(45) = lu(45) * lu(41)
         lu(51) = lu(51) - lu(42) * lu(50)
         lu(52) = lu(52) - lu(43) * lu(50)
         lu(53) = lu(53) - lu(44) * lu(50)
         lu(54) = lu(54) - lu(45) * lu(50)
         lu(58) = lu(58) - lu(42) * lu(57)
         lu(59) = lu(59) - lu(43) * lu(57)
         lu(60) = lu(60) - lu(44) * lu(57)
         lu(61) = lu(61) - lu(45) * lu(57)
         lu(72) = lu(72) - lu(42) * lu(71)
         lu(73) = lu(73) - lu(43) * lu(71)
         lu(74) = lu(74) - lu(44) * lu(71)
         lu(75) = lu(75) - lu(45) * lu(71)
         lu(80) = lu(80) - lu(42) * lu(79)
         lu(81) = lu(81) - lu(43) * lu(79)
         lu(82) = lu(82) - lu(44) * lu(79)
         lu(83) = lu(83) - lu(45) * lu(79)
         lu(51) = 1._r8 / lu(51)
         lu(52) = lu(52) * lu(51)
         lu(53) = lu(53) * lu(51)
         lu(54) = lu(54) * lu(51)
         lu(59) = lu(59) - lu(52) * lu(58)
         lu(60) = lu(60) - lu(53) * lu(58)
         lu(61) = lu(61) - lu(54) * lu(58)
         lu(73) = lu(73) - lu(52) * lu(72)
         lu(74) = lu(74) - lu(53) * lu(72)
         lu(75) = lu(75) - lu(54) * lu(72)
         lu(81) = lu(81) - lu(52) * lu(80)
         lu(82) = lu(82) - lu(53) * lu(80)
         lu(83) = lu(83) - lu(54) * lu(80)
         lu(59) = 1._r8 / lu(59)
         lu(60) = lu(60) * lu(59)
         lu(61) = lu(61) * lu(59)
         lu(74) = lu(74) - lu(60) * lu(73)
         lu(75) = lu(75) - lu(61) * lu(73)
         lu(82) = lu(82) - lu(60) * lu(81)
         lu(83) = lu(83) - lu(61) * lu(81)
         lu(74) = 1._r8 / lu(74)
         lu(75) = lu(75) * lu(74)
         lu(83) = lu(83) - lu(75) * lu(82)
         lu(83) = 1._r8 / lu(83)
      end subroutine lu_fac01
      subroutine lu_fac( lu )
      use shr_kind_mod, only : r8 => shr_kind_r8
      implicit none
!-----------------------------------------------------------------------
! ... dummy args
!-----------------------------------------------------------------------
      real(r8), intent(inout) :: lu(:)
      call lu_fac01( lu )
      end subroutine lu_fac
      end module mo_lu_factor
